/*
 * @dedescription: 状态存储
 * @Author: along
 * @Date: 2020-09-14
 * @Last Modified by: along
 * @Last Modified time: 2020-12-01
 */
export default {
    namespaced: true,
    state: {
        json: {},// 店铺公告预览
        couponList: [],//装修页面，优惠券数据
        customSort: 1,//装修页面 1:按数组顺序,2:销量高到低,3:价格低到高,4:价格高到低
        customSortCommon: 1,//装修页面 1:按数组顺序,2:销量高到低,3:价格低到高,4:价格高到低
    },
    mutations: {
        SET_JSON (state, json) {
            localStorage.setItem('SET_JSON', json);
            state.json = json;
        },
        SET_COUPON_LIST (state, list) {
            state.couponList = list;
        },
        SET_CUSTOM_SORT (state, sort) {
            state.customSort = sort;
        },
        SET_CUSTOM_SORT_COMMON (state, sort) {
            state.customSortCommon = sort;
        }
    }
};
